import Vue from 'vue'
import Router from 'vue-router'
import store from '../store'

Vue.use(Router)



export default new Router({
	// mode: 'history',
	routes: [{
		path: '/',
		name: 'Home',
		redirect: {
			name: 'login'
		},
		meta: {},
		component: () => import('@/views/home/index'),
		children:[{
			path: '/sealList',
			name: 'sealList',
			meta:{
				Key:2,
				title:'印章列表',
				requireAuth: true ,// 添加该字段，表示进入这个路由是需要登录的
			},
			component:()=>import('@/views/home/sealList/sealList'),
		},
		{
			path: '/maintainList',
			name: 'maintainList',
			meta:{
				Key:2,
				title:'维护列表',
				requireAuth: true ,// 添加该字段，表示进入这个路由是需要登录的
			},
			component:()=>import('@/views/home/maintainList/maintainList'),
		},
		{
			path: '/aplicationCenter',
			name: 'aplicationCenter',
			meta:{
				Key:2,
				title:'应用中心',
				requireAuth: true ,// 添加该字段，表示进入这个路由是需要登录的
			},
			component:()=>import('@/views/home/aplicationCenter/aplicationCenter'),
		},
		{
			path: '/systemSettings',
			name: 'systemSettings',
			meta:{
				Key:2,
				title:'系统设置',
				requireAuth: true ,// 添加该字段，表示进入这个路由是需要登录的
			},
			component:()=>import('@/views/home/systemSettings/systemSettings'),
		},
		{
			path: '/updateLog',
			name: 'updateLog',
			meta:{
				Key:2,
				title:'更新日志',
				requireAuth: true ,// 添加该字段，表示进入这个路由是需要登录的
			},
			component:()=>import('@/views/home/updateLog/updateLog'),
		},
		{
			path: '/sysLog',
			name: 'sysLog',
			meta:{
				Key:2,
				title:'系统日志',
				requireAuth: true ,// 添加该字段，表示进入这个路由是需要登录的
			},
			component:()=>import('@/views/home/sysLog/sysLog'),
		},
		{
			path: '/webSocket',
			name: 'webSocket',
			meta:{
				Key:2,
				title:'websocket',
				requireAuth: true ,// 添加该字段，表示进入这个路由是需要登录的
			},
			component:()=>import('@/views/home/webSocket/webSocket'),
		},
		
		
		
		]
	},{
			path: '/login',
			name: 'login',
			meta: {
				key: 1,
				title: '登录',
			},
			component: () => import('@/views/login/index')
		},]
})
